package com.levtech.moviemanager.loan;

import com.levtech.moviemanager.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;

public class EditLoanActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_edit_loan);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.edit_loan, menu);
		return true;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem selection)
	{
		switch(selection.getItemId())
		{
			case R.id.add_loan:	startActivity(new Intent(this, AddLoanActivity.class));
									return true;
			
			case R.id.view_loan:	startActivity(new Intent(this, ViewLoanActivity.class));
									return true;
			
			default: return super.onOptionsItemSelected(selection);
		}
	}

}
